import { Column, Entity, ManyToOne } from 'typeorm';
import { BaseEntity } from './baseentity';
import { ADesign } from './design.entity';
import { AScope } from './scope.entity';

@Entity()
export class AProperty extends BaseEntity {
  @Column({ nullable: false })
  key: string;

  @ManyToOne(() => ADesign, (a) => a.propertys, { onDelete: 'CASCADE' })
  design: ADesign;

  @ManyToOne(() => AScope, (a) => a.propertys, { onDelete: 'CASCADE' })
  scope: AScope;

  @Column({ nullable: false })
  value: string;

  @Column({ nullable: false })
  valueType: string;
}
